<script setup lang="ts">
//瀑布流 - 块
import { SingleMeat } from "@/store/interface";
import Images from "@/components/block/images.vue";
defineProps<{ data: SingleMeat }>();
</script>
<template>
  <section class="flow-item sku-item-block-box waterfall">
    <a :href="data.link">
      <figure class="item-cover">
        <Images :img="data.featured_image" class="animation" />
      </figure>
      <article class="item-title two-line">
        <h3>{{ data.title }}</h3>
      </article>
      <article class="item-bottom-info">
        <aside class="item-price">
          <span>阅读</span>
        </aside>
      </article>
    </a>
  </section>
</template>
<style scoped lang="less">
.sku-item-block-box:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.02);
}
.sku-item-block-box {
  position: relative;
  height: 100%;
  background: #fff;
  border-radius: 0.4rem;
  overflow: hidden;
  cursor: pointer;
  .item-cover {
    position: relative;
    display: block;
    margin: 0 auto;
    overflow: hidden;
  }
  .item-title.two-line h3 {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .item-title {
    //margin: 0.1rem 0;
    margin: 1rem 0 0.6rem;
    padding: 0 0.6rem;
    h3 {
      font-size: 0.5rem;
      font-weight: 700;
      line-height: 0.7rem;
      color: rgba(0, 0, 0, 0.7);
      width: 100%;
      margin: 0;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
    h3 {
      font-size: 0.6rem;
      line-height: 0.8rem;
    }
  }
}

.item-bottom-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  padding: 0 0.6rem;
  .item-price {
    font-family: Arial;
    font-size: 0.5rem;
    font-weight: 700;
    color: #d44d44;
    line-height: 0.8rem;
    span {
      display: inline-block;
    }
  }
}
.sku-item-block-box.waterfall .item-bottom-info .item-price {
  font-size: 0.6rem;
}
.common-flow-layout .flow-item {
  margin: 0.3rem 0.15rem;
  padding-bottom: 0.6rem;
}
</style>
